import requests


with open("./douban.txt", "w") as f:
    url = "https://movie.douban.com/j/search_subjects?type=movie&tag=%E7%83%AD%E9%97%A8&sort=recommend&page_limit" \
          "=1000&page_start=0 "
    headers = {
        "User-Agent": "Mozilla/5.0 (Linux; Android 6.0; Nexus 5 Build/MRA58N) AppleWebKit/537.36 (KHTML, like Gecko) "
                      "Chrome/79.0.3945.117 Mobile Safari/537.36"}
    r = requests.get(url=url, headers=headers)
    ret = r.json()["subjects"]
    for i in ret:
        f.write(str(i) + '\n')
